home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / POSIX_TY.{6E < prev    next >
Text File  |  1999-09-17  |  1KB  |  57 lines

  1. #ifndef _LINUX_POSIX_TYPES_H
  2. #define _LINUX_POSIX_TYPES_H
  3.  
  4. /*
  5.  * This file is generally used by user-level software, so you need to
  6.  * be a little careful about namespace pollution etc.  Also, we cannot
  7.  * assume GCC is being used.
  8.  */
  9.  
  10. #ifndef NULL
  11. # define NULL        ((void *) 0)
  12. #endif
  13.  
  14. /*
  15.  * This allows for 1024 file descriptors: if NR_OPEN is ever grown
  16.  * beyond that you'll have to change this too. But 1024 fd's seem to be
  17.  * enough even for such "real" unices like OSF/1, so hopefully this is
  18.  * one limit that doesn't have to be changed [again].
  19.  *
  20.  * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
  21.  * <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
  22.  * place for them. Solved by having dummy defines in <sys/time.h>.
  23.  */
  24.  
  25. /*
  26.  * Those macros may have been defined in <gnu/types.h>. But we always
  27.  * use the ones here. 
  28.  */
  29. #undef __NFDBITS
  30. #define __NFDBITS    (8 * sizeof(unsigned long))
  31.  
  32. #undef __FD_SETSIZE
  33. #define __FD_SETSIZE    1024
  34.  
  35. #undef __FDSET_LONGS
  36. #define __FDSET_LONGS    (__FD_SETSIZE/__NFDBITS)
  37.  
  38. #undef __FDELT
  39. #define    __FDELT(d)    ((d) / __NFDBITS)
  40.  
  41. #undef __FDMASK
  42. #define    __FDMASK(d)    (1UL << ((d) % __NFDBITS))
  43.  
  44. typedef struct {
  45.     unsigned long fds_bits [__FDSET_LONGS];
  46. } __kernel_fd_set;
  47.  
  48. /* Type of a signal handler.  */
  49. typedef void (*__kernel_sighandler_t)(int);
  50.  
  51. /* Type of a SYSV IPC key.  */
  52. typedef int __kernel_key_t;
  53.  
  54. #include <asm/posix_types.h>
  55.  
  56. #endif /* _LINUX_POSIX_TYPES_H */
  57.